package ua.epam.muzalevskiy.traction.vehicle;

/**
 * Current class use to create new vehicle. It realized pattern
 * <code>Factory method</code>.
 *
 * @author Muzalevskiy Vitaliy
 */
public class VehicleFactory {

    /**
     * Method to create new vehicle.
     *
     * @param vehicleID  - identifier of vehicle.
     * @param vehicleNumber - number of vehicle.
     * @param type - <code>VehicleType</code> value that describe type of vehicle.
     * @return
     */
    public Vehicle createVehicle(int vehicleID, String vehicleNumber, 
            VehicleType type){
        
        return new Vehicle(vehicleID, vehicleNumber, type);     
//        switch(type){
//            case BUS:
//                return new Bus(vehicleID, vehicleNumber);
//            case TROLLEYBUS:    
//                return new Trolleybus(vehicleID, vehicleNumber);
//            case TRAM:    
//                return new Tram(vehicleID, vehicleNumber);
//            default:
//                throw new IllegalArgumentException();
//        }
    }
}

